﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ciji.Application.Dto
{
    /// <summary>
    /// 
    /// </summary>
    public class WorkStaticDto : IComparable<WorkStaticDto>
    {
        public string EmployeeId { get; set; }
        public string EmployeeName { get; set; }
        public string EmployeeAvator { get; set; }
        public decimal AssessCount { get; set; }
        public decimal DBCount { get; set; }
        public decimal JZCount { get; set; }
        public decimal RijianCount { get; set; }
        public decimal XFYCount { get; set; }
        public decimal AllCount
        {
            get
            {
                return (this.AssessCount + this.DBCount + this.JZCount + this.RijianCount + this.XFYCount);
            }
        }

        public int CompareTo(WorkStaticDto other)
        {
            if (null == other)
            {
                return -1;//空值比较大，返回1
            }
            return (other.AssessCount + other.DBCount + other.JZCount + other.RijianCount + other.XFYCount).CompareTo((this.AssessCount + this.DBCount + this.JZCount + this.RijianCount + this.XFYCount));//降序
        }

        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return false;
            }
            if ((obj.GetType().Equals(this.GetType())) == false)
            {
                return false;
            }
            WorkStaticDto temp = (WorkStaticDto)obj;

            return this.EmployeeId.Equals(temp.EmployeeId);

        }
    }


    /// <summary>
    /// 
    /// </summary>
    //SELECT A.sys_Creater,A.sys_CreaterName,CONVERT(varchar(100),A.sys_CreateDate,20) AS sys_CreateDate,B.Gid,B.Name,C.GroupName
    public class WorkStaticDetailDto
    {
        public string sys_Creater { get; set; }
        public string sys_CreaterName { get; set; }
        public string sys_CreateDate { get; set; }
        public string Gid { get; set; }
        public string Name { get; set; }
        public string GroupName { get; set; }  
    }

    public class WorkStaticDetail2Dto
    {
     
        public string GroupName { get; set; }

        public int AssessCount { get; set; }
    }
}